/**
 * 
 */
package com.ambow.entity;

import java.io.Serializable;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;


/**
 * @author Administrator
 *  @param 产品表
 */
@Entity
@Table
public class Product extends ID implements Serializable  {
   private String name;
   private double price;
   private String color;
   private String size;
   private String label;
   private int amount;
   private String number;//产品编号
   private String kind;//产品种类（男女儿童）
   private String type;//产品类型（太阳镜，护目镜。。。）
   private String brand;//产品品牌
   private String photo;//产品图片
   
   public String getKind() {
	return kind;
}
public void setKind(String kind) {
	this.kind = kind;
}
public String getType() {
	return type;
}
public void setType(String type) {
	this.type = type;
}
public String getBrand() {
	return brand;
}
public void setBrand(String brand) {
	this.brand = brand;
}
public String getPhoto() {
	return photo;
}
public void setPhoto(String photo) {
	this.photo = photo;
}
private Date publishTime;//上市时间
   private  int status;//已下架,1有货
   @OneToMany(targetEntity=OrderDetail.class,mappedBy="product")
   private Set<OrderDetail> orderDetails=new HashSet<OrderDetail>();
   @OneToMany(targetEntity=Orders.class,mappedBy="product")
   private Set<Orders> orders= new HashSet<Orders>();
   @OneToMany(targetEntity=SaleRecord.class,mappedBy="product")
   private Set<SaleRecord> saleRecords=new HashSet<SaleRecord>();
public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}
public double getPrice() {
	return price;
}
public void setPrice(double price) {
	this.price = price;
}
public String getColor() {
	return color;
}
public void setColor(String color) {
	this.color = color;
}
public String getSize() {
	return size;
}
public void setSize(String size) {
	this.size = size;
}
public String getLabel() {
	return label;
}
public void setLabel(String label) {
	this.label = label;
}
public int getAmount() {
	return amount;
}
public void setAmount(int amount) {
	this.amount = amount;
}
public String getNumber() {
	return number;
}
public void setNumber(String number) {
	this.number = number;
}
public Date getPublishTime() {
	return publishTime;
}
public void setPublishTime(Date publishTime) {
	this.publishTime = publishTime;
}
public int getStatus() {
	return status;
}
public void setStatus(int status) {
	this.status = status;
}
public Set<OrderDetail> getOrderDetails() {
	return orderDetails;
}
public void setOrderDetails(Set<OrderDetail> orderDetails) {
	this.orderDetails = orderDetails;
}
public Set<Orders> getOrders() {
	return orders;
}
public void setOrders(Set<Orders> orders) {
	this.orders = orders;
}
public Set<SaleRecord> getSaleRecords() {
	return saleRecords;
}
public void setSaleRecords(Set<SaleRecord> saleRecords) {
	this.saleRecords = saleRecords;
}
   
   
   
}
